<?php
/**
 * Created by PhpStorm.
 * User: reshared
 * Date: 2017/9/28
 * Time: 下午1:44
 */

namespace Index\Model;


use Think\Model;

class BaseModel extends Model
{
    public function getById($id)
    {
        return $this->where("{$this->getPk()} = {$id}")->find();
    }
}